<?php

use think\migration\Migrator;
use think\migration\db\Column;

class AnyClassNameYouWant extends Migrator
{
    /**
     * Change Method.
     *
     * Write your reversible migrations using this method.
     *
     * More information on writing migrations is available here:
     * http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
     *
     * The following commands can be used in this method and Phinx will
     * automatically reverse them when rolling back:
     *
     *    createTable
     *    renameTable
     *    addColumn
     *    renameColumn
     *    addIndex
     *    addForeignKey
     *
     * Remember to call "create()" or "update()" and NOT "save()" when working
     * with the Table class.
     */
    public function change()
    {
//        //客户表--新增序列号
//        $table  =  $this->table('db_provider');
//        $table->addColumn('serial_number', 'string',array('limit'  =>  20,'default'=>'','comment'=>'【新】序列号'))
//              ->update();

//        //商品单位表--新增序列号
//        $table  =  $this->table('db_unit');
//        $table->addColumn('serial_number', 'string',array('limit'  =>  20,'default'=>'','comment'=>'【新】序列号'))
//            ->update();

//        //商品包装表--新增序列号
//        $table  =  $this->table('db_packing');
//        $table->addColumn('serial_number', 'string',array('limit'  =>  20,'default'=>'','comment'=>'【新】序列号'))
//            ->update();

//      //库位表-新增序列号
//        db_warehouse_config
//        $table  =  $this->table('db_warehouse_config');
//        $table->addColumn('serial_number', 'string',array('limit'  =>  20,'default'=>'','comment'=>'【新】序列号'))
//            ->update();

////        //客户表--新增国内客户USCI字段，tax_id字段
//        $table  =  $this->table('db_provider');
//        $table->addColumn('usci', 'string',array('limit'  =>  100,'null'=>true, 'comment'=>'【新】国内客户USCI#'))
//              ->addColumn('tax_id', 'string',array('limit'  =>  100,'null'=>true,'comment'=>'【新】国外客户TAX ID'))
//              ->update();

        //php think migrate:run
    }
}
